<template>
    <div class="SS-root">
        <Headers></Headers>
        <div class="bott-fi">
            <router-link :to="'/zhuye/'+include.sender.id">
                <img class="fi" :src="include.photo.path" />
                <p style="font-size:16px;padding:5px;">{{include.msg}}</p>
            </router-link>
            <!-- 去购买 -->
            <div class="img-box" v-if="include.item">
                <div class="i-tuo">
                    <img src='../assets/taobao.png' style="width:30px; height:30px;" />
                    <div class="div-bx">
                        <p class="span">{{include.source_title}}</p>
                        <h3 style="margin:3px;color:red;">￥ {{include.item.price}}</h3>
                    </div>
                </div>
                <button style="width:60px;">去购买</button>
            </div>
            <!-- 购买下面的 -->
            <div class="btt">
                <router-link :to="'/zhuye/'+include.sender.id">
                    <img class="touxiang" :src="include.sender.avatar" />
                </router-link>
                <div class="btt-shou">
                    <router-link class='user' :to="'/zhuye/'+include.sender.id">
                        <section>{{include.sender.username}} &#X3000;</section>
                        <span class="u-span">{{include.add_datetime_pretty}}</span>
                    </router-link>
                    <p> 收集到 {{include.album.name}}</p>
                </div>
            </div>
        </div>
        <!-- 列表 -->
        <div class="bott-se">
            <div class="ll-box" v-for="b in blog">
                <img :src="b.photo.path" />
                <p> {{b.msg}}</p>
                <p>&#X3000;★ {{b.favorite_count}}</p>
    
            </div>
        </div>
        <!-- 猜你喜欢(固定) -->
        <div class="cai">
            <div class="shang">
                <p>显脸小发型推荐
                    <span>88924人喜欢 </span>
                </p>
                <div class=" fa">
                    <img src="../assets/1.jpeg" />
                    <img src="../assets/2.jpeg" />
                    <img src="../assets/3.jpeg" />
                </div>
                <p class="ppp">只要你会穿身高根本不是事
                    <span>93624人喜欢</span>
                </p>
                <div class="gao">
                    <img src="../assets/4.jpeg" />
                    <img src="../assets/5.jpeg" />
                    <img src="../assets/6.jpeg" />
                </div>
            </div>
            <button>点击查看更多</button>
        </div>
    
    </div>
</template>
<script>
import Headers from '../components/Headers.vue'
export default {
    components: {
        Headers
    },
    data: function () {
        return {
            include: {},
            blog: []

        }
    },
    mounted: function () {
        this.requestBlog()
        this.requestInclude()
    },
    methods: {
        requestInclude: function () {
            this.$http.get("dt/napi/blog/detail/?", {
                params: {
                    include_fields: "[top_like_users, top_forward_users,top_like_users, tags, top_comments, related_albums, extra_links, related_albums.covers, root_album, share_links, share_info, atest_events, extra_html]",
                    blog_id: this.$route.params.id

                }
            })
                .then(function (res) {
                    // console.dir(res.data.data)
                    this.include = res.data.data
                }.bind(this))
        }
        ,
        requestBlog: function () {
            this.$http.get("dt/napi/blog/list/by_root_album/?", {
                params: {
                    start: "0",
                    include_fields: ["sender", "Calbum"],
                    limit: 4,
                    album_id: this.$route.params.albumid,
                    blog_id: this.$route.params.id,
                    _: "1497335274048",

                }
            })
                .then(function (res) {
                    console.dir(res.data)
                    this.blog = res.data.data.object_list
                }.bind(this))

        },
    }
}
</script>
<style scoped>
.SS-root {
    background-color: #F5F5F5;
}

.bott-fi {
    box-sizing: border-box;
    width: 100%;
    margin: 5px 10px 0px 10px;
    background-color: white;
}
.bott-fi a{
    color: black;
    text-decoration: none;
}

.goumai {
    border: 1px solid red;
    background-color: red;
    color: white;
    padding: 10px;
    border-radius: 5px;
}

.img-box {
    border-top: 1px solid grey;
    box-sizing: border-box;
    padding: 10px;
    display: flex;
    justify-content: space-between;
}

.fa img {
    width: 30%;
    margin-left: 2%;
}

.fi {
    width: 100%;
    height: 100%;
}

.touxiang {
    width: 10%;
    height: 10%;
    border-radius: 50%;
}






/* 卖家 */

.img-box {
    display: flex;
    justify-content: space-between;
    padding: 5px;
}

.img-box img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-top: 10px;
}

.i-tuo {
    display: flex;
    width: 80%;
}

.span {
    padding: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin: 3px;
}

.div-bx {
    width: 80%;
}

.user {
    color: blue;
    font-size: 16px;
}

.u-span {
    color: grey;
    font-size: 12px;
    position: absolute;
    right: 20px;
}

.btt {
    border-top: 0.5px solid #F2F2F2;
}

.btt-shou {
    width: 70%;
}

.btt-shou p {
    margin: 2px;
}

.btt-shou section {
    color: #3498DB;
}

.btt a {
    text-decoration: none;
}



/* 列表 */

.btt {
    display: flex;
    justify-content: space-around;
    padding: 5px;
}

.btt img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.bott-se {
    width: 100%;
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    background-color: #F5F5F5;
    box-sizing: border-box;
    padding: 5px;
}

.ll-box {
    width: 45%;
    background-color: white;
    box-shadow: 1px 1px 1px 1px #F5F5F5;
    margin-top: 10px;
}

.ll-box img {
    width: 100%;
    height: 60%;
}

.ll-box p {
    color: #979797;
}


/* 猜你喜欢(固定) */

.cai {
    margin-top: 20px;
    width: 100%;
    height: 50%;
    background-color: #585858;
    box-sizing: border-box;
    padding: 10px;
}

.shang {
    box-sizing: border-box;
    padding: 0px 20px 10px 20px;
    background-color: white;
    border-radius: 5px;
}

.shang p {
    margin: 0px 0px 10px;
    color: grey;
    font-size: 14px;
    padding-top: 10px;
}

.shang p span {
    position: absolute;
    right: 45px;
    font-size: 12px;
}

.fa {
    display: flex;
    justify-content: space-between;
    padding-bottom: 10px;
    border-bottom: 1px solid #f5f5f5;
}

.gao {
    display: flex;
    justify-content: space-between;
}

.gao img {
    width: 30%;
    height: 100px;
}

button {
    width: 100%;
    height: 36px;
    line-height: 18px;
    margin: 5px 0px;
    background-color: #E75A46;
    border: 0.5px solid grey;
    border-radius: 3px;
    color: white;
}

.shang .fa img {
    width: 30%;
    height: 100px;
}
</style>
